/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cassys.datatransferobjects;

import java.io.Serializable;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;

/**
 *
 * @author Priyanka
 */
public class ResultDTO implements Serializable {

    private String student;
    private String studentname;
    private double evaluationTotal;
    private HashMap<String, Double> evaluationItems;
    private int peerevaluationTotal;
    private String moduleCode;

    public ResultDTO() {
        evaluationItems = new HashMap<String, Double>();
    }

    public double getEvaluationItems(String key) {
        return evaluationItems.get(key);
    }

    public HashMap<String, Double> getEvaluationItemsMap() {
        return evaluationItems;
    }

    public void setEvaluationItems(String key, Double value) {
        evaluationItems.put(key, value);
    }

    public void setModuleCode(String moduleCode) {
        this.moduleCode = moduleCode;
    }

    public String getModuleCode() {
        return moduleCode;
    }

    public double getEvaluationTotal() {
        if (evaluationItems.size() > 0) {
            Collection c = evaluationItems.values();
            Iterator<Double> itr = c.iterator();
            while (itr.hasNext()) {
                evaluationTotal = +itr.next();
            }
        }
        return evaluationTotal;
    }

    public int getPeerevaluationTotal() {
        return peerevaluationTotal;
    }

    public void setStudentname(String studentname) {
        this.studentname = studentname;
    }

    public String getStudentname() {
        return studentname;
    }

    public String getStudent() {
        return student;
    }

    public void setEvaluationTotal(double evaluationTotal) {
        this.evaluationTotal = evaluationTotal;
    }

    public void setPeerevaluationTotal(int peerevaluationTotal) {
        this.peerevaluationTotal = peerevaluationTotal;
    }

    public void setStudent(String student) {
        this.student = student;
    }
}
